home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / maple_st.swf / scripts / DefineButton2_1330 / BUTTONCONDACTION on(release).as < prev   
Encoding:
Text File  |  2010-04-12  |  5.2 KB  |  132 lines

  1. on(release){
  2.    if(buynum <= 200)
  3.    {
  4.       if(this._parent.itemselect1.select == true && _root.previewitemaddavaible(buynum,this._parent.itemshowgo1) >= buynum)
  5.       {
  6.          if(_root.money <= this._parent.itemcostshow1 * buynum)
  7.          {
  8.             _root.alertbox("µé¿τÜäΘçæΘîóΣ╕ìΦ╢│∩╝ü∩╝ü");
  9.             _root.buynum = 1;
  10.             this._visible = 0;
  11.          }
  12.          else
  13.          {
  14.             trace("Φè▒Σ║å" + this._parent.itemcostshow1 * buynum + "µÑôσ╣ú~");
  15.             trace("Φ▓╖Σ║å\"" + this._parent.shopitemname1 + "\"" + buynum + "σÇï");
  16.             _root.newitem(buynum,this._parent.itemshowgo1,this._parent.itemdessave1,this._parent.shopitemname1,this._parent.itemcostshow1);
  17.             _root.money -= this._parent.itemcostshow1 * buynum;
  18.             this._visible = 0;
  19.             _root.buynum = 1;
  20.          }
  21.       }
  22.       else if(this._parent.itemselect2.select == true && _root.previewitemaddavaible(buynum,this._parent.itemshowgo2) >= buynum)
  23.       {
  24.          if(_root.money <= this._parent.itemcostshow2 * buynum)
  25.          {
  26.             _root.alertbox("µé¿τÜäΘçæΘîóΣ╕ìΦ╢│∩╝ü∩╝ü");
  27.             _root.buynum = 1;
  28.             this._visible = 0;
  29.          }
  30.          else
  31.          {
  32.             trace("Φè▒Σ║å" + this._parent.itemcostshow2 * buynum + "µÑôσ╣ú~");
  33.             trace("Φ▓╖Σ║å\"" + this._parent.shopitemname2 + "\"" + buynum + "σÇï");
  34.             _root.newitem(buynum,this._parent.itemshowgo2,this._parent.itemdessave2,this._parent.shopitemname2,this._parent.itemcostshow2);
  35.             _root.money -= this._parent.itemcostshow2 * buynum;
  36.             this._visible = 0;
  37.             _root.buynum = 1;
  38.          }
  39.       }
  40.       else if(this._parent.itemselect3.select == true && _root.previewitemaddavaible(buynum,this._parent.itemshowgo3) >= buynum)
  41.       {
  42.          if(_root.money <= this._parent.itemcostshow3 * buynum)
  43.          {
  44.             _root.alertbox("µé¿τÜäΘçæΘîóΣ╕ìΦ╢│∩╝ü∩╝ü");
  45.             this._visible = 0;
  46.             _root.buynum = 1;
  47.          }
  48.          else
  49.          {
  50.             trace("Φè▒Σ║å" + this._parent.itemcostshow3 * buynum + "µÑôσ╣ú~");
  51.             trace("Φ▓╖Σ║å\"" + this._parent.shopitemname3 + "\"" + buynum + "σÇï");
  52.             _root.newitem(buynum,this._parent.itemshowgo3,this._parent.itemdessave3,this._parent.shopitemname3,this._parent.itemcostshow3);
  53.             _root.money -= this._parent.itemcostshow3 * buynum;
  54.             this._visible = 0;
  55.             _root.buynum = 1;
  56.          }
  57.       }
  58.       else if(this._parent.itemselect4.select == true && _root.previewitemaddavaible(buynum,this._parent.itemshowgo4) >= buynum)
  59.       {
  60.          if(_root.money <= this._parent.itemcostshow4 * buynum)
  61.          {
  62.             _root.alertbox("µé¿τÜäΘçæΘîóΣ╕ìΦ╢│∩╝ü∩╝ü");
  63.             this._visible = 0;
  64.             _root.buynum = 1;
  65.          }
  66.          else
  67.          {
  68.             trace("Φè▒Σ║å" + this._parent.itemcostshow4 * buynum + "µÑôσ╣ú~");
  69.             trace("Φ▓╖Σ║å\"" + this._parent.shopitemname4 + "\"" + buynum + "σÇï");
  70.             _root.newitem(buynum,this._parent.itemshowgo4,this._parent.itemdessave4,this._parent.shopitemname4,this._parent.itemcostshow4);
  71.             _root.money -= this._parent.itemcostshow4 * buynum;
  72.             this._visible = 0;
  73.             _root.buynum = 1;
  74.          }
  75.       }
  76.       else if(this._parent.itemselect5.select == true && _root.previewitemaddavaible(buynum,this._parent.itemshowgo5) >= buynum)
  77.       {
  78.          if(_root.money <= this._parent.itemcostshow5 * buynum)
  79.          {
  80.             _root.alertbox("µé¿τÜäΘçæΘîóΣ╕ìΦ╢│∩╝ü∩╝ü");
  81.             this._visible = 0;
  82.             _root.buynum = 1;
  83.          }
  84.          else
  85.          {
  86.             trace("Φè▒Σ║å" + this._parent.itemcostshow5 * buynum + "µÑôσ╣ú~");
  87.             trace("Φ▓╖Σ║å\"" + this._parent.shopitemname5 + "\"" + buynum + "σÇï");
  88.             _root.newitem(buynum,this._parent.itemshowgo5,this._parent.itemdessave5,this._parent.shopitemname5,this._parent.itemcostshow5);
  89.             _root.money -= this._parent.itemcostshow5 * buynum;
  90.             this._visible = 0;
  91.             _root.buynum = 1;
  92.          }
  93.       }
  94.       else if(this._parent.itemselect1.select == true)
  95.       {
  96.          _root.alertbox("Θüôσà╖µ¼äΣ╜ìΣ╕ìσñáµö╛τ╜«∩╝ü∩╝ü");
  97.          _root.buynum = 1;
  98.          this._visible = 0;
  99.       }
  100.       else if(this._parent.itemselect2.select == true)
  101.       {
  102.          _root.alertbox("Θüôσà╖µ¼äΣ╜ìΣ╕ìσñáµö╛τ╜«∩╝ü∩╝ü");
  103.          _root.buynum = 1;
  104.          this._visible = 0;
  105.       }
  106.       else if(this._parent.itemselect3.select == true)
  107.       {
  108.          _root.alertbox("Θüôσà╖µ¼äΣ╜ìΣ╕ìσñáµö╛τ╜«∩╝ü∩╝ü");
  109.          _root.buynum = 1;
  110.          this._visible = 0;
  111.       }
  112.       else if(this._parent.itemselect4.select == true)
  113.       {
  114.          _root.alertbox("Θüôσà╖µ¼äΣ╜ìΣ╕ìσñáµö╛τ╜«∩╝ü∩╝ü");
  115.          _root.buynum = 1;
  116.          this._visible = 0;
  117.       }
  118.       else if(this._parent.itemselect5.select == true)
  119.       {
  120.          _root.alertbox("Θüôσà╖µ¼äΣ╜ìΣ╕ìσñáµö╛τ╜«∩╝ü∩╝ü");
  121.          _root.buynum = 1;
  122.          this._visible = 0;
  123.       }
  124.    }
  125.    else
  126.    {
  127.       _root.alertbox("µé¿Φ│╝Φ▓╖τÜäµò╕ΘçÅσñ¬σñÜ∩╝îΦ½ïσêåµë╣Φ│╝Φ▓╖∩╝ü∩╝ü");
  128.       this._visible = 0;
  129.       _root.buynum = 1;
  130.    }
  131. }
  132.